<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/


$app->post('/login/sms', 'AuthController@loginWithSms');

//

$app->get('/books/nearby', 'BookController@listNearbyBooks');
$app->get('/books/all', 'BookController@listAllBooks');

//test

$app->get('/test', 'ExampleController@test');

$app->post('/pst', 'ExampleController@pst');

$app->get('/sms/foo', 'SmsController@test');


//****** for wechat XiaoChengXu

$app->post('/wx/login', 'WxController@login');

$app->post('/wx/mobile/bind', 'WxController@bindMobile');

$app->post('/wx/openid', 'WxController@obtainOpenid');

$app->post('/wx/order/make', 'WxController@makeOrder');

$app->post('/wx/sms', 'SmsController@sendSms');

//
//$app->post('/wx/payment/seed', 'WxController@seedPayment');
//$app->post('/wx/payment/levels', 'WxController@levelsPayment');
$app->get('wx/book/{book_uuid}', 'BookController@showBook');
$app->get('wx/books/nearby', 'BookController@listNearbyBooks');